package cn.icanci.loopstack.ddk.admin.biz.mapping.config;

import java.util.Collection;
import java.util.List;

/**
 * @author icanci
 * @since 1.0 Created in 2023/01/06 20:56
 */
public interface BaseMapping<T, R> {

    /**
     * do2vo
     * 
     * @param t T
     * @return R
     */
    R do2vo(T t);

    /**
     * dos2vos
     * 
     * @param ts T
     * @return R
     */
    List<R> dos2vos(Collection<T> ts);

    /**
     * vo2do
     * 
     * @param r R
     * @return T
     */
    T vo2do(R r);

    /**
     * vos2dos
     * 
     * @param rs R
     * @return T
     */
    List<T> vos2dos(List<R> rs);
}
